<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>工单类型</title>
    <th:block th:include="include :: header('日期和时间')"/>
</head>
<body>
<input type="hidden" id="type">
<div  style="display: flex;flex-wrap: wrap;width: 100%;height: 100%">
    <button class="btn btn-circle active " style="height:30px; width: 80px;margin-left: 25px;margin-right: 25px" th:each="type:${types}" th:text="${type.typeName}" onclick="choose(this)"></button>

</div>

</body>
<th:block th:include="include :: footer"/>
<script th:inline="javascript">
    function choose(btn) {
        console.log(btn.innerText)
        $('#type').val(btn.innerText)
        console.log($('#type').val())
    }
</script>
</html>